<?php
/**
 * 用户版本升级转换购物车转wiki
 * 商家spu转wiki
 */

ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';

use Biz\model\entity\SpuRelateWiki as SpuRelateWikiEntity;
use Biz\model\wiki\Wiki as mWiki;

//{\"id\":0,\"goods_id\":\"3986\",\"wiki_id\":0,\"transform_platform\":\"淘宝\",\"transform_shop_id\":\"3841508748\",\"transform_shop_name\":\"挚爱甄选官方店\",\"transform_shop_spu\":\"566256740805\",\"transform_brand\":\"\",\"shop_id\":\"3833789\",\"admin_uid\":0,\"addtime\":\"\",\"relate_status\":0,\"edittime\":\"\"})
try {
    $obj = new SpuRelateWikiEntity();
    $obj->goods_id = 3986;
    $obj->wiki_id = 0;
    $obj->transform_platform = '淘宝';
    $obj->transform_shop_id = 3841508748;
    $obj->transform_shop_name = '挚爱甄选官方店';
    $obj->transform_shop_spu = '566256740805';
    $obj->transform_brand = '';
    $obj->shop_id = '3833789';
    $params = [
        3986 => $obj,
    ];
    \Biz\module\Classes\wiki\SpuToWiki::_async_wikiUpload($params);
} catch (Exception $e) {
    var_dump ($e->getFile(), $e->getLine(), $e->getMessage());
}

